<?php

$router_pathinfo = pathinfo($_SERVER['SCRIPT_FILENAME']);
if (in_array($router_pathinfo['extension'], ['css', 'js', 'png', 'jpg', 'jpeg', 'gif', 'font'])) {
    return false;
    exit;
}

$_SERVER['SERVER_NAME'] = '127.0.0.1';
$action = !empty($_GET['step']) ? $_GET['step'] : '';

$filename = $_SERVER['SCRIPT_FILENAME'];
if (strpos($filename, 'router.php') !== false) {
    if (file_exists(__DIR__.'/install.php')) {
        header('location: ./install.php');
        exit;
    }
}

include_once $_SERVER['SCRIPT_FILENAME'];
